package cn.cycleif.init.config;

import cn.cycleif.init.execute.ApplicationCommandLineRunnerExecute;
import cn.cycleif.init.execute.ApplicationInitializingBeanExecute;
import cn.cycleif.init.execute.ApplicationPostConstructExecute;
import cn.cycleif.init.execute.ApplicationStartEventListenerExecute;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

/**
 * @Date: 25/1/17-18:52
 * @Desc:
 */
public class InitializeAutoConfig {

  @Bean
  public ApplicationInitializingBeanExecute applicationInitializingBeanExecute(
      ConfigurableApplicationContext applicationContext) {
    return new ApplicationInitializingBeanExecute(applicationContext);
  }

  @Bean
  public ApplicationPostConstructExecute applicationPostConstructExecute(
      ConfigurableApplicationContext applicationContext) {
    return new ApplicationPostConstructExecute(applicationContext);
  }

  @Bean
  public ApplicationStartEventListenerExecute applicationStartEventListenerExecute(
      ConfigurableApplicationContext applicationContext) {
    return new ApplicationStartEventListenerExecute(applicationContext);
  }

  @Bean
  public ApplicationCommandLineRunnerExecute applicationCommandLineRunnerExecute(
      ConfigurableApplicationContext applicationContext) {
    return new ApplicationCommandLineRunnerExecute(applicationContext);
  }
}
